<template>
  <section class="home-city-positioning">
    <div class="text">
      <span> 当前定位城市： </span>
      <span class="select"> 定位不准时，请在城市列表中选择 </span>
    </div>
    <div class="city" @click="handleCitySkip">
      <span>
        {{ cityPositioning.name }}
      </span>
      <span class="arrow-right"></span>
    </div>
  </section>
</template>

<script>
export default {
  props: {
    cityPositioning: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  methods: {
    handleCitySkip() {
      this.$router.push(`/city/${this.cityPositioning.id}`);
    },
  },
};
</script>
<style lang="less" scoped>
.home-city-positioning {
  border-bottom: 2px solid #eaeaea;
  margin-bottom: 15px;
  background-color: #fff;
  font-size: 12px;
  .text {
    display: flex;
    justify-content: space-between;
    padding: 20px 10px 10px;
    border-bottom: 1px solid #eaeaea;
    font-size: 14px;
    & span:nth-last-child(1) {
      font-size: 12px;
      color: #9fa1a2;
    }
    .select {
      font-weight: bold;
    }
  }
  .city {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eaeaea;
    font-size: 18px;
    font-weight: bold;
    color: var(--color-tint);
    .arrow-right {
      display: block;
      width: 10px;
      height: 10px;
      border-left: 2px solid #a9c2f1;
      border-top: 2px solid #a9c2f1;
      transform: rotate(135deg);
    }
  }
}
</style>